const express = require('express'),
    mysql = require('mysql');
const port = 3002;
const app = express();
const conn = mysql.createConnection({
    host: 'localhost',
    user: 'root',
    password: '135375',
    database: 'article'
});
conn.connect();
app.get('/date', (req, res) => {
    conn.query('SELECT * FROM listArticle  WHERE id = ?', [57], (err, res) => {
        if (err) throw err;
        console.log(res)
    })
    res.send('ok')
})
app.listen(port)